import groovy.json.*

def builder = new groovy.json.JsonBuilder()
def root = builder.cfn {       
               name 'CSE A Chemistry' //name of curricular frame network
               network {
               frames { domain_general
               {
               Chemical_entity{
               
               } 
               Electron{
               
               }
               Proton{
               
               }
               Neutron{
               
               }
               Nucleon{
               
               }
               Atomic_entity{
                 relations{inherits 'Chemical_entity'} 
               }
               Molecular_entity{
                 relations{inherits 'Chemical_entity'}
               }
               Atom{
                 relations{inherits 'Atomic_entity'}
               }
               Molecule{
                 relations{inherits 'Molecular_entity'}
               }
               Chemical_element{ 
               FEs{               
               }
               relations{ inherits 'Chemical_substance'}
               }
               Chemical_substance{
               FEs{              
               }
               relations{
                 } 
               }
               Reactant { FEs{ reactant {cardinality 'unbounded'} } relations{inherits 'Chemical_substance'} }
               Product { FEs{} relations{inherits 'Chemical_substance'} }
               Chemical_reaction { FEs{}  relations{uses 'Reactant', 'Product'} }
               }
               
               domain_organic {
               
                                Carbon_carbon_bonds{
                                
                                }
               
                                subdomain_functional_groups{
                                
                                }
               
               }
               
               domain_physical {
               
                                 subdomain_chemical_thermodynamics{
               
                                 }
                                 
                                 subdomain_chemical_kinetics{
                                 
                                 }
               
               }
               
               domain_inorganic{
               
               }
               
               domain_analytical{
               
               }
               
               domain_theoretical{
               
               }
               
               ilos
               {
               
               ilo1 { pkg 'org.kungkhies.cse.chemistry'
                      text '''Define the term 'molecule'.''' 
                      relations(instance: 'Communicate_categorization', 
                                ilo: 'Molecule'
                      )
                      FEs(item: 'molecule')
                      
                      
                    }  
               ilo2 { pkg 'org.kungkhies.cse.chemistry'
                      text 'List the subatomic particles from which atoms are composed.' 
                      relations(instance: 'List',
                                target: 'list',
                                ilo: 'Atom'
                      )
                      FEs(item: 'the subatomic particles from which atoms are composed')
                    } 
               ilo3 { pkg 'org.kungkhies.cse.chemistry'
                      text 'Describe the mass and charge properties of the subatomic particles from which atoms are composed.'
                      relations(instance: 'Communicate_categorization',
                                target: 'describe',
                                ilo: 'Atomic_structure'
                      )
                    } 
               ilo4 { pkg 'org.kungkhies.cse.chemistry'
                      text 'Briefly describe the structure of an atom.'
                      relations(instance: 'Communicate_categorization', 
                                target: 'describe',
                                ilo: 'Atomic_Structure'
                      )
                      FEs(item: 'the structure of an atom',
                          manner: 'briefly' )
                    } 
               ilo5 { pkg 'org.kungkhies.cse.chemistry'
                      text 'Define the term atomic number.' 
                      relations(instance: 'Communicate_categorization',
                                target: 'define',
                                ilo: 'Atomic_structure'
                      )
                      FEs(item: 'atomic number')
                    } 
              ilo6 { pkg 'org.kungkhies.cse.chemistry'
                      text 'Define the term nucleon.' 
                      relations(instance: 'Communicate_categorization', 
                                target: 'define',
                                ilo: 'Subatomic_particles'
                      )
                    } 
                    
               ilo7 { pkg 'org.kungkhies.cse.chemistry'
                      text 'Define the term atomic mass number.' 
                      relations(instance: 'Communicate_categorization',
                                target: 'define',
                                ilo: 'Atomic_structure'
                      )
                      FEs(item: 'atomic mass number')
                    } 
                    
                 ilo8 { pkg 'org.kungkhies.cse.chemistry'
                      text 'Define the term nucleon number.' 
                      relations(instance: 'Communicate_categorization', 
                                target: 'define',
                                ilo: 'Atomic_structure'
                      )
                      FEs(item: 'nucleon number')
                    } 
               
               }
               
               framenet{
                
               Communicate_categorization {
               
               }
               
               }
               
               }
               
               } //network
               
               
           } //root
           
       

println builder.toPrettyString()




